#include "transport/lcm/lcm_proxy.h"

namespace motovis {
namespace transport {

LcmProxy::LcmProxy()
{
    thread_ = std::make_shared<std::thread>(std::bind(&LcmProxy::exec, this));
}

LcmProxy::~LcmProxy()
{
    thread_->join();
}

void LcmProxy::exec()
{
    while (0 == lcm_.handle())
    {
        // do nothing, just call lcm::handle
    }
}

} // namespace transport
} // namespace motovis
